<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Filter</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Filter</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
											<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
						
			</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Filters data library.</p>
	<ul class="tags">
				<li><span class="field">author:</span> Andrej Jursa</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_libraries---filter.php.html">/libraries/filter.php</a> (line <span class="field"><a href="../__filesource/fsource_LIST_Libraries__librariesfilter.php.html#a8">8</a></span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>


	<a name="sec-const-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constant Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Constants</span> (<a href="#sec-consts">details</a>)
												<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<div class="const-summary">
								<div class="const-title">
					<a href="#FILTERS_ARRAY" title="details" class="const-name">FILTERS_ARRAY</a> = 					<span class="var-type"> 'list_filters_array'</span>

				</div>
								<div class="const-title">
					<a href="#FILTERS_SETTINGS" title="details" class="const-name">FILTERS_SETTINGS</a> = 					<span class="var-type"> 'list_filters_settings'</span>

				</div>
								<div class="const-title">
					<a href="#FILTER_SETTINGS_COURSE_FIELD" title="details" class="const-name">FILTER_SETTINGS_COURSE_FIELD</a> = 					<span class="var-type"> 'course_field'</span>

				</div>
								<div class="const-title">
					<a href="#FILTER_SETTINGS_FIELDS_DELETED_ON_COURSE_CHANGE" title="details" class="const-name">FILTER_SETTINGS_FIELDS_DELETED_ON_COURSE_CHANGE</a> = 					<span class="var-type"> 'fields_deleted_on_course_change'</span>

				</div>
							</div>
		</div>
	</div>

	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
															<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
					</div>
		<div class="info-box-body">
			<div class="var-summary">
																								<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$CI" title="details" class="var-name">$CI</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																												
												<div class="method-definition">
											<span class="method-result">Filter</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#get_filter_course_name_field" title="details" class="method-name">get_filter_course_name_field</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$filter_name</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">array<string></span>
										<a href="#get_filter_delete_on_course_change" title="details" class="method-name">get_filter_delete_on_course_change</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$filter_name</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#is_array_of_strings" title="details" class="method-name">is_array_of_strings</a>
											(<span class="var-type">array<mixed></span>&nbsp;<span class="var-name">$array</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">array<midex></span>
										<a href="#restore_filter" title="details" class="method-name">restore_filter</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$filter_name</span>, [<span class="var-type">integer|<a href="../LIST_DM_Models/Teacher.html">Teacher</a></span>&nbsp;<span class="var-name">$teacher</span> = <span class="var-default">NULL</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$course_field</span> = <span class="var-default">NULL</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#set_all_filters_course" title="details" class="method-name">set_all_filters_course</a>
											(<span class="var-type"><a href="../LIST_DM_Models/Course.html">Course</a>|integer</span>&nbsp;<span class="var-name">$course</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#set_filter_course_name_field" title="details" class="method-name">set_filter_course_name_field</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$filter_name</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$field_name</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#set_filter_delete_on_course_change" title="details" class="method-name">set_filter_delete_on_course_change</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$filter_name</span>, <span class="var-type">array<string></span>&nbsp;<span class="var-name">$fields</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#store_filter" title="details" class="method-name">store_filter</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$filter_name</span>, <span class="var-type">array<mixed></span>&nbsp;<span class="var-name">$filter_data</span>)
									</div>
								</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
												<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$CI" id="$CI"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$CI</span>
			 = <span class="var-default"> NULL</span>			(line <span class="line-number"><a href="../__filesource/fsource_LIST_Libraries__librariesfilter.php.html#a15">15</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																			<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
										<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number"><a href="../__filesource/fsource_LIST_Libraries__librariesfilter.php.html#a17">17</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Filter</span>
		<span class="method-name">
			__construct
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodget_filter_course_name_field" id="get_filter_course_name_field"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">get_filter_course_name_field</span> (line <span class="line-number"><a href="../__filesource/fsource_LIST_Libraries__librariesfilter.php.html#a92">92</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This method will return name of field which contain course id.</p>
	<ul class="tags">
				<li><span class="field">return:</span> name of field or NULL if not set.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			get_filter_course_name_field
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$filter_name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$filter_name</span><span class="var-description">: name of filter.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodget_filter_delete_on_course_change" id="get_filter_delete_on_course_change"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">get_filter_delete_on_course_change</span> (line <span class="line-number"><a href="../__filesource/fsource_LIST_Libraries__librariesfilter.php.html#a103">103</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This method will return name of fields which will be deleted from filter when course id forced to be changed.</p>
	<ul class="tags">
				<li><span class="field">return:</span> array of field names or NULL if not set.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array<string></span>
		<span class="method-name">
			get_filter_delete_on_course_change
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$filter_name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$filter_name</span><span class="var-description">: name of filter.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodis_array_of_strings" id="is_array_of_strings"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">is_array_of_strings</span> (line <span class="line-number"><a href="../__filesource/fsource_LIST_Libraries__librariesfilter.php.html#a152">152</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This method will verify if the array passed by parameter is array of strings.</p>
	<ul class="tags">
				<li><span class="field">return:</span> TRUE, if parameter is array of strings, FALSE otherwise.</li>
				<li><span class="field">access:</span> private</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			is_array_of_strings
		</span>
					(<span class="var-type">array<mixed></span>&nbsp;<span class="var-name">$array</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array<mixed></span>
				<span class="var-name">$array</span><span class="var-description">: array to verify.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodrestore_filter" id="restore_filter"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">restore_filter</span> (line <span class="line-number"><a href="../__filesource/fsource_LIST_Libraries__librariesfilter.php.html#a44">44</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This method will return data by filter name.</p>
<p class="description"><p>If the second and third parameters are set, it will check teacher data for his prefered course and  inject this value into filter by specified conditions, only if these filter data are empty.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> filter data.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array<midex></span>
		<span class="method-name">
			restore_filter
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$filter_name</span>, [<span class="var-type">integer|<a href="../LIST_DM_Models/Teacher.html">Teacher</a></span>&nbsp;<span class="var-name">$teacher</span> = <span class="var-default">NULL</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$course_field</span> = <span class="var-default">NULL</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$filter_name</span><span class="var-description">: name of filter.</span>			</li>
					<li>
				<span class="var-type">integer|<a href="../LIST_DM_Models/Teacher.html">Teacher</a></span>
				<span class="var-name">$teacher</span><span class="var-description">: teacher id or teacher object.</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$course_field</span><span class="var-description">: field in filter which contain course id in filter.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodset_all_filters_course" id="set_all_filters_course"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">set_all_filters_course</span> (line <span class="line-number"><a href="../__filesource/fsource_LIST_Libraries__librariesfilter.php.html#a114">114</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This method will force all filters which have field for course id to set this field to id specified in parameter.</p>
	<ul class="tags">
				<li><span class="field">return:</span> TRUE on success, FALSE otherwise.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			set_all_filters_course
		</span>
					(<span class="var-type"><a href="../LIST_DM_Models/Course.html">Course</a>|integer</span>&nbsp;<span class="var-name">$course</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../LIST_DM_Models/Course.html">Course</a>|integer</span>
				<span class="var-name">$course</span><span class="var-description">: course id, existing course object or NULL.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodset_filter_course_name_field" id="set_filter_course_name_field"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">set_filter_course_name_field</span> (line <span class="line-number"><a href="../__filesource/fsource_LIST_Libraries__librariesfilter.php.html#a66">66</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This method will store name of field containing course id inside filter identified by filter name.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			set_filter_course_name_field
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$filter_name</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$field_name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$filter_name</span><span class="var-description">: name of filter.</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$field_name</span><span class="var-description">: name of field containing course id.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodset_filter_delete_on_course_change" id="set_filter_delete_on_course_change"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">set_filter_delete_on_course_change</span> (line <span class="line-number"><a href="../__filesource/fsource_LIST_Libraries__librariesfilter.php.html#a79">79</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This method will store array of field names which have to be deleted, when filter is forced to change course id.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			set_filter_delete_on_course_change
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$filter_name</span>, <span class="var-type">array<string></span>&nbsp;<span class="var-name">$fields</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$filter_name</span><span class="var-description">: name of filter.</span>			</li>
					<li>
				<span class="var-type">array<string></span>
				<span class="var-name">$fields</span><span class="var-description">: array of field names.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodstore_filter" id="store_filter"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">store_filter</span> (line <span class="line-number"><a href="../__filesource/fsource_LIST_Libraries__librariesfilter.php.html#a27">27</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This method will store filter data under filter name into session.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			store_filter
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$filter_name</span>, <span class="var-type">array<mixed></span>&nbsp;<span class="var-name">$filter_data</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$filter_name</span><span class="var-description">: name of filter.</span>			</li>
					<li>
				<span class="var-type">array<mixed></span>
				<span class="var-name">$filter_data</span><span class="var-description">: data of filter.</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>

	<a name="sec-consts"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constants</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Constants</a> (<span class="disabled">details</span>)
						
			
												<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
														| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="constFILTERS_ARRAY" id="FILTERS_ARRAY"><!-- --></A>
<div class="evenrow">

	<div class="const-header">
		<span class="const-title">
			<span class="const-name">FILTERS_ARRAY</span>
			 = <span class="const-default"> 'list_filters_array'</span>
			(line <span class="line-number"><a href="../__filesource/fsource_LIST_Libraries__librariesfilter.php.html#a10">10</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
	
</div>
<a name="constFILTERS_SETTINGS" id="FILTERS_SETTINGS"><!-- --></A>
<div class="oddrow">

	<div class="const-header">
		<span class="const-title">
			<span class="const-name">FILTERS_SETTINGS</span>
			 = <span class="const-default"> 'list_filters_settings'</span>
			(line <span class="line-number"><a href="../__filesource/fsource_LIST_Libraries__librariesfilter.php.html#a11">11</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
	
</div>
<a name="constFILTER_SETTINGS_COURSE_FIELD" id="FILTER_SETTINGS_COURSE_FIELD"><!-- --></A>
<div class="evenrow">

	<div class="const-header">
		<span class="const-title">
			<span class="const-name">FILTER_SETTINGS_COURSE_FIELD</span>
			 = <span class="const-default"> 'course_field'</span>
			(line <span class="line-number"><a href="../__filesource/fsource_LIST_Libraries__librariesfilter.php.html#a12">12</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
	
</div>
<a name="constFILTER_SETTINGS_FIELDS_DELETED_ON_COURSE_CHANGE" id="FILTER_SETTINGS_FIELDS_DELETED_ON_COURSE_CHANGE"><!-- --></A>
<div class="oddrow">

	<div class="const-header">
		<span class="const-title">
			<span class="const-name">FILTER_SETTINGS_FIELDS_DELETED_ON_COURSE_CHANGE</span>
			 = <span class="const-default"> 'fields_deleted_on_course_change'</span>
			(line <span class="line-number"><a href="../__filesource/fsource_LIST_Libraries__librariesfilter.php.html#a13">13</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
	
</div>
						
		</div>
	</div>

	<p class="notes" id="credit">
		Documentation generated on Fri, 13 Sep 2013 12:32:35 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.4</a>
	</p>
	</div></body>
</html>